﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Blacklight.Controls.Wpf"
        xmlns:System="clr-namespace:System;assembly=mscorlib" 
    >

    <!-- ********** SHARED STYLES ********** -->
    <!-- ScrollViewer style -->
    <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="0,0,0,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollViewer">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                        <Border.Resources>
                            <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">
                                <Setter Property="IsTabStop" Value="False"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ScrollBar">
                                            <Grid x:Name="Root">
                                                <Grid.Resources>
                                                    <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="Transparent">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="#00FFFFFF">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Fill="{TemplateBinding Foreground}" Opacity="0.5"/>
                                                            <Path Height="8" Width="4" Opacity="0" Stretch="Uniform" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Margin="6,4,6,4" x:Name="Flash" Fill="#FFFFFFFF"/>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="#00FFFFFF">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " Fill="{TemplateBinding Foreground}" Opacity="0.5"/>
                                                            <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " Margin="6,4,6,4" Fill="#FFFFFFFF" Opacity="0" x:Name="Flash"/>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="#00FFFFFF">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Fill="{TemplateBinding Foreground}" Opacity="0.5"/>
                                                            <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Margin="4,6,4,6" Fill="#FFFFFFFF" Opacity="0" x:Name="path"/>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="#00000000">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Fill="{TemplateBinding Foreground}" Opacity="0.5"/>
                                                            <Path Height="4" Width="8" Opacity="0" Stretch="Uniform" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Margin="4,6,4,6" x:Name="Flash" Fill="#FFFFFFFF"/>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                                        <Grid>
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Grid Margin="1,0,1,0" x:Name="ThumbVisual">
                                                                <Rectangle Fill="{TemplateBinding Foreground}" Stroke="{x:Null}" Margin="1,0,1,0" RadiusX="6" RadiusY="6" x:Name="rectangle" Opacity="0.5"/>
                                                                <Rectangle Margin="1,0,1,0" Stroke="{x:Null}" RadiusX="6" RadiusY="6" Fill="#FFFFFFFF" x:Name="Flash" Opacity="0"/>
                                                            </Grid>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                                        <Grid>
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Grid Margin="0,1,0,1" x:Name="ThumbVisual">
                                                                <Rectangle Margin="0,1,0,1" Opacity="0.5" Fill="{TemplateBinding Foreground}" Stroke="{x:Null}" RadiusX="6" RadiusY="6"/>
                                                                <Rectangle Margin="0,1,0,-1" Opacity="0" Stroke="{x:Null}" RadiusX="6" RadiusY="6" x:Name="Flash" Fill="#FFFFFFFF"/>
                                                            </Grid>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Grid.Resources>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver"/>
                                                        <VisualState x:Name="Disabled" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Grid x:Name="HorizontalRoot">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto"/>
                                                        <ColumnDefinition Width="Auto"/>
                                                        <ColumnDefinition Width="Auto"/>
                                                        <ColumnDefinition Width="*"/>
                                                        <ColumnDefinition Width="Auto"/>
                                                    </Grid.ColumnDefinitions>
                                                    <RepeatButton Margin="1" x:Name="HorizontalSmallDecrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalDecrementTemplate}" Grid.Column="0" Interval="50" Foreground="{TemplateBinding Foreground}" Background="{x:Null}" BorderBrush="{x:Null}"/>
                                                    <RepeatButton x:Name="HorizontalLargeDecrease" Width="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="1" Interval="50"/>
                                                    <Thumb MinWidth="18" x:Name="HorizontalThumb" Width="18" Template="{StaticResource HorizontalThumbTemplate}" Grid.Column="2" BorderBrush="{x:Null}" Foreground="{TemplateBinding Foreground}"/>
                                                    <RepeatButton x:Name="HorizontalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="3" Interval="50"/>
                                                    <RepeatButton Margin="1" x:Name="HorizontalSmallIncrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalIncrementTemplate}" Grid.Column="4" Interval="50" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{TemplateBinding Foreground}"/>
                                                </Grid>
                                                <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="Auto"/>
                                                        <RowDefinition Height="Auto"/>
                                                        <RowDefinition Height="Auto"/>
                                                        <RowDefinition Height="*"/>
                                                        <RowDefinition Height="Auto"/>
                                                    </Grid.RowDefinitions>
                                                    <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallDecrease" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.Row="0" Interval="50" Foreground="{TemplateBinding Foreground}"/>
                                                    <RepeatButton Height="0" x:Name="VerticalLargeDecrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="1" Interval="50"/>
                                                    <Thumb Height="18" MinHeight="18" x:Name="VerticalThumb" Template="{StaticResource VerticalThumbTemplate}" Grid.Row="2" Foreground="{TemplateBinding Foreground}"/>
                                                    <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="3" Interval="50"/>
                                                    <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallIncrease" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.Row="4" Interval="50" Foreground="{TemplateBinding Foreground}"/>
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Border.Resources>
                        <Grid Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ScrollContentPresenter Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" x:Name="ScrollContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            <ScrollBar Margin="5,-1,0,-1" x:Name="VerticalScrollBar" Style="{StaticResource ScrollBarStyle}" Width="14" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" IsTabStop="False" Grid.Column="1" Grid.Row="0" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{TemplateBinding VerticalOffset}" MinWidth="0" MinHeight="0"/>
                            <ScrollBar Height="14" Margin="-1,0,-1,0" x:Name="HorizontalScrollBar" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" IsTabStop="False" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{TemplateBinding HorizontalOffset}" Style="{StaticResource ScrollBarStyle}" MinWidth="0" MinHeight="0"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Button Style -->
    <Style x:Key="ButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="#ffffffff"/>
        <Setter Property="BorderBrush" Value="#ffffffff"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Height="Auto" Width="Auto">
                            
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Flash" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard/>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard/>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="Flash" Opacity="0" Fill="#FFFFFFFF" Stroke="{x:Null}"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

   
    <!-- ********** ANIMATION STYLES ********** -->
    <!-- ScrollViewer style -->
    <Style TargetType="local:AnimatedExpander">
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="BorderBrush" Value="#44ffffff" />
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,40" MappingMode="Absolute">
                    <GradientStop Color="#33ffffff" Offset="0" />
                    <GradientStop Color="#00ffffff" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AnimatedExpander">
                    <Border BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            >
                        <StackPanel x:Name="LayoutRoot">
                            <StackPanel.Resources>
                                <Storyboard x:Key="ExpandStoryboard">
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScrollViewer" Storyboard.TargetProperty="(FrameworkElement.Height)">
                                        <SplineDoubleKeyFrame x:Name="ExpandKeyFrame" Value="100" KeyTime="00:00:00.5"
                                                          KeySpline="0.73199999332428,0.138999998569489,0.101999998092651,0.999000012874603" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                                <Storyboard x:Key="CollapseStoryboard">
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScrollViewer" Storyboard.TargetProperty="(FrameworkElement.Height)">
                                        <SplineDoubleKeyFrame x:Name="CollapseKeyFrame" Value="0" KeyTime="00:00:00.5"
                                                          KeySpline="0.73199999332428,0.138999998569489,0.101999998092651,0.999000012874603" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </StackPanel.Resources>

                            <ToggleButton x:Name="ExpandToggleButton"
                                          IsChecked="{TemplateBinding IsExpanded}"
                                      Foreground="{TemplateBinding Foreground}"
                                      Padding="5"
                                      HorizontalContentAlignment="Stretch">
                                <ToggleButton.Template>
                                    <ControlTemplate TargetType="ToggleButton">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="25"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="Normal">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FlashRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="MouseOver">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FlashRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.2"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FlashRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Disabled"/>
                                                </VisualStateGroup>
                                                <VisualStateGroup x:Name="CheckStates">
                                                    <VisualState x:Name="Indeterminate"/>
                                                    <VisualState x:Name="Checked">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpandPath" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="90"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Unchecked">
                                                        <Storyboard>
                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ExpandPath" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                                <VisualStateGroup x:Name="FocusStates">
                                                    <VisualState x:Name="Unfocused"/>
                                                    <VisualState x:Name="Focused"/>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <Rectangle Margin="1.334,0,-1.334,0" Grid.ColumnSpan="2" Fill="#FFFFFFFF" Stroke="{x:Null}" x:Name="FlashRectangle" Opacity="0"/>
                                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Margin="{TemplateBinding Padding}"/>
                                            <Path Height="8" Width="7" HorizontalAlignment="Center" x:Name="ExpandPath" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Fill="{TemplateBinding Foreground}" Stretch="Fill" Stroke="{TemplateBinding Foreground}" Data="M5.75,10.125 L5.75,25.25 L16.8125,17.813541 z">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform/>
                                                        <SkewTransform/>
                                                        <RotateTransform/>
                                                        <TranslateTransform/>
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                            </Path>
                                        </Grid>
                                    </ControlTemplate>
                                </ToggleButton.Template>
                                <ContentPresenter
                                Content="{TemplateBinding Header}"
                                ContentTemplate="{TemplateBinding HeaderTemplate}"
                                Cursor="{TemplateBinding Cursor}"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                />
                            </ToggleButton>
                            <ScrollViewer x:Name="ScrollViewer" 
                                          Style="{StaticResource ScrollViewerStyle}"
                                      Height="0"
                                      HorizontalScrollBarVisibility="Disabled"
                                      VerticalScrollBarVisibility="Hidden"
                                      BorderThickness="0"
                                      Padding="0"
                                      >
                                <ContentPresenter
                                x:Name="ContentContentPresenter"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Cursor="{TemplateBinding Cursor}"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </ScrollViewer>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- StrokeTextBlock style -->
    <Style TargetType="local:StrokeTextBlock">
        <Setter Property="Text" Value="StrokeTextBlock" />
        <Setter Property="StrokeOpacity" Value="1" />
        <Setter Property="Stroke" Value="#ffffffff" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Foreground" Value="#ff000000" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:StrokeTextBlock">
                    <Grid>
                        <ItemsControl x:Name="PART_ItemsControl" 
                              VerticalAlignment="Top" HorizontalAlignment="Left" 
                              Opacity="{TemplateBinding StrokeOpacity}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <Grid  />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>

                        <TextBlock x:Name="PART_TextBlock"
                                   TextWrapping="{TemplateBinding TextWrapping}" 
                                   Foreground="{TemplateBinding Foreground}"
                                   FontSize="{TemplateBinding FontSize}" 
                                   FontFamily="{TemplateBinding FontFamily}" 
                                   FontWeight="{TemplateBinding FontWeight}"
                                   VerticalAlignment="Top" HorizontalAlignment="Left"
                                   UseLayoutRounding="False"
                                   LineHeight="{TemplateBinding LineHeight}"
                                   Text="{TemplateBinding Text}" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DropShadowTextBlock style -->
    <Style TargetType="local:DropShadowTextBlock">
        <Setter Property="Text" Value="DropShadowTextBlock" />
        <Setter Property="DropShadowColor" Value="#ff000000" />
        <Setter Property="DropShadowOpacity" Value="0.5" />
        <Setter Property="DropShadowAngle" Value="45" />
        <Setter Property="DropShadowDistance" Value="2" />
        <Setter Property="Foreground" Value="#ff000000" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DropShadowTextBlock">
                    <Grid Background="{TemplateBinding Background}">

                        <TextBlock Text="{TemplateBinding Text}"
                                   TextDecorations="{TemplateBinding TextDecorations}"
                                   TextWrapping="{TemplateBinding TextWrapping}"
                                   IsHitTestVisible="False"
                                   >
                            <TextBlock.Foreground>
                                <SolidColorBrush x:Name="PART_DropShadowBrush" />
                            </TextBlock.Foreground>
                            <TextBlock.RenderTransform>
                                <TranslateTransform X="2" Y="2" x:Name="PART_DropShadowTranslate" />
                            </TextBlock.RenderTransform>
                        </TextBlock>

                        <TextBlock
                               Text="{TemplateBinding Text}"
                               TextDecorations="{TemplateBinding TextDecorations}"
                               TextWrapping="{TemplateBinding TextWrapping}"
                               />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ********** BORDER STYLES ********** -->
    <!-- RadialShadowBorder style -->
    <Style TargetType="local:RadialShadowBorder">
        <Setter Property="RadialShadowColor" Value="#ff000000" />
        <Setter Property="RadialShadowOpacity" Value="0.5" />
        <Setter Property="RadialShadowWidth" Value="1.25" />
        <Setter Property="RadialShadowSpread" Value="0" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadialShadowBorder">
                    <Grid>

                        <Ellipse x:Name="PART_Shadow" Height="30" Margin="0,0,0,-15" VerticalAlignment="Bottom"
                                 Opacity="{TemplateBinding RadialShadowOpacity}" RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="PART_ShadowScale" />
                                    <TranslateTransform x:Name="PART_ShadowTranslate" />
                                </TransformGroup>
                            </Ellipse.RenderTransform>
                            <Ellipse.Fill>
                                <RadialGradientBrush>
                                    <GradientStop Color="#ff000000" Offset="0" x:Name="PART_ShadowInnerStop" />
                                    <GradientStop Color="#00000000" Offset="1" x:Name="PART_ShadowOuterStop" />
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>

                        <local:ClippingBorder Background="{TemplateBinding Background}" 
                                CornerRadius="{TemplateBinding CornerRadius}" 
                                Padding="{TemplateBinding Padding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                ClipContent="{TemplateBinding ClipContent}">
                            <ContentPresenter />
                        </local:ClippingBorder>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- DropShadowBorder style -->
    <Style TargetType="local:DropShadowBorder">
        <Setter Property="DropShadowOpacity" Value="0.5" />
        <Setter Property="DropShadowColor" Value="#ff000000" />
        <Setter Property="DropShadowAngle" Value="45" />
        <Setter Property="DropShadowDistance" Value="20" />
        <Setter Property="DropShadowSpread" Value="0" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DropShadowBorder">
                    <Grid>
                        <Border Opacity="{TemplateBinding DropShadowOpacity}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                   CornerRadius="{TemplateBinding ShadowCornerRadius}" IsHitTestVisible="False" RenderTransformOrigin="0,0" >
                            <Border.RenderTransform>
                                <TranslateTransform x:Name="PART_DropShadowTranslateTransform" X="5" Y="5" />
                            </Border.RenderTransform>
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0" x:Name="PART_ShadowOuterStop1" />
                                    <GradientStop Color="#ff000000" Offset="0.1" x:Name="PART_ShadowVertical1"/>
                                    <GradientStop Color="#ff000000" Offset="0.9" x:Name="PART_ShadowVertical2"/>
                                    <GradientStop Color="#00000000" Offset="1" x:Name="PART_ShadowOuterStop2" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.OpacityMask>
                                <LinearGradientBrush EndPoint="1.0,0.5" StartPoint="0.0,0.5" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0"/>
                                    <GradientStop Color="#FF000000" Offset="0.1" x:Name="PART_ShadowHorizontal1"/>
                                    <GradientStop Color="#FF000000" Offset="0.9" x:Name="PART_ShadowHorizontal2"/>
                                    <GradientStop Color="#00000000" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                        <local:ClippingBorder Background="{TemplateBinding Background}" 
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Padding="{TemplateBinding Padding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                ClipContent="{TemplateBinding ClipContent}">
                            <ContentPresenter />
                        </local:ClippingBorder>


                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- OuterGlowBorder style -->
    <Style TargetType="local:OuterGlowBorder">
        <Setter Property="OuterGlowSize" Value="10" />
        <Setter Property="OuterGlowOpacity" Value="0.5" />
        <Setter Property="OuterGlowColor" Value="#ff000000" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:OuterGlowBorder">
                    <Grid>
                        <Border Opacity="{TemplateBinding OuterGlowOpacity}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                   CornerRadius="{TemplateBinding ShadowCornerRadius}" x:Name="PART_OuterGlowBorder" IsHitTestVisible="False" >
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0" x:Name="PART_ShadowOuterStop1" />
                                    <GradientStop Color="#ff000000" Offset="0.1" x:Name="PART_ShadowVertical1"/>
                                    <GradientStop Color="#ff000000" Offset="0.9" x:Name="PART_ShadowVertical2"/>
                                    <GradientStop Color="#00000000" Offset="1" x:Name="PART_ShadowOuterStop2" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.OpacityMask>
                                <LinearGradientBrush EndPoint="1.0,0.5" StartPoint="0.0,0.5" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0"/>
                                    <GradientStop Color="#FF000000" Offset="0.1" x:Name="PART_ShadowHorizontal1"/>
                                    <GradientStop Color="#FF000000" Offset="0.9" x:Name="PART_ShadowHorizontal2"/>
                                    <GradientStop Color="#00000000" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                        <local:ClippingBorder Background="{TemplateBinding Background}" 
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Padding="{TemplateBinding Padding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                ClipContent="{TemplateBinding ClipContent}">
                            <ContentPresenter />
                        </local:ClippingBorder>


                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ClippingBorder style -->
    <Style TargetType="local:ClippingBorder">
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ClippingBorder">
                    <Border Background="{TemplateBinding Background}" 
                            CornerRadius="{TemplateBinding CornerRadius}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                                x:Name="PART_Border"
                                
                                >

                        <Grid>

                            <ContentControl x:Name="PART_TopLeftContentControl"
                                            HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                                <ContentControl.Clip>
                                    <RectangleGeometry x:Name="PART_TopLeftClip" />
                                </ContentControl.Clip>

                                <ContentControl x:Name="PART_TopRightContentControl"  
                                            HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
                                    <ContentControl.Clip>
                                        <RectangleGeometry x:Name="PART_TopRightClip" />
                                    </ContentControl.Clip>

                                    <ContentControl x:Name="PART_BottomRightContentControl" 
                                                HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
                                        <ContentControl.Clip>
                                            <RectangleGeometry x:Name="PART_BottomRightClip" />
                                        </ContentControl.Clip>

                                        <ContentControl x:Name="PART_BottomLeftContentControl" 
                                                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
                                            <ContentControl.Clip>
                                                <RectangleGeometry x:Name="PART_BottomLeftClip" />
                                            </ContentControl.Clip>

                                            <ContentPresenter Margin="{TemplateBinding Padding}" />

                                        </ContentControl>

                                    </ContentControl>

                                </ContentControl>

                            </ContentControl>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- InnerGlowBorder style -->
    <Style TargetType="local:InnerGlowBorder">
        <Setter Property="InnerGlowSize" Value="10,10,10,10" />
        <Setter Property="InnerGlowOpacity" Value="0.5" />
        <Setter Property="InnerGlowColor" Value="#ff000000" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="ContentZIndex" Value="0" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:InnerGlowBorder">
                    <local:ClippingBorder Background="{TemplateBinding Background}" 
                            CornerRadius="{TemplateBinding CornerRadius}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            ClipContent="{TemplateBinding ClipContent}">
                        <Grid>

                            <ContentPresenter Margin="{TemplateBinding Padding}" Canvas.ZIndex="{TemplateBinding ContentZIndex}" />

                            <Border x:Name="PART_LeftGlow" IsHitTestVisible="False" Canvas.ZIndex="0"
                                    Opacity="{TemplateBinding InnerGlowOpacity}"
                                    HorizontalAlignment="Left" VerticalAlignment="Stretch"
                                    Width="10">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                        <GradientStop Offset="0" Color="#ff000000" x:Name="PART_LeftGlowStop0" />
                                        <GradientStop Offset="1" Color="#00000000" x:Name="PART_LeftGlowStop1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border x:Name="PART_TopGlow" IsHitTestVisible="False" Canvas.ZIndex="0"
                                    Opacity="{TemplateBinding InnerGlowOpacity}"
                                    HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                    Height="10">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0.5, 0" EndPoint="0.5, 1">
                                        <GradientStop Offset="0" Color="#ff000000" x:Name="PART_TopGlowStop0" />
                                        <GradientStop Offset="1" Color="#00000000" x:Name="PART_TopGlowStop1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border x:Name="PART_RightGlow" IsHitTestVisible="False" Canvas.ZIndex="0"
                                    Opacity="{TemplateBinding InnerGlowOpacity}"
                                    HorizontalAlignment="Right" VerticalAlignment="Stretch"
                                    Width="10">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="1, 0.5" EndPoint="0, 0.5">
                                        <GradientStop Offset="0" Color="#ff000000" x:Name="PART_RightGlowStop0" />
                                        <GradientStop Offset="1" Color="#00000000" x:Name="PART_RightGlowStop1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border x:Name="PART_BottomGlow" IsHitTestVisible="False" Canvas.ZIndex="0"
                                    Opacity="{TemplateBinding InnerGlowOpacity}"
                                    HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
                                    Height="10">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0.5, 1" EndPoint="0.5, 0">
                                        <GradientStop Offset="0" Color="#ff000000" x:Name="PART_BottomGlowStop0" />
                                        <GradientStop Offset="1" Color="#00000000" x:Name="PART_BottomGlowStop1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                    </local:ClippingBorder>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- GlassBorder style -->
    <Style TargetType="local:GlassBorder">
        <Setter Property="GlassOpacity" Value="1" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="ContentZIndex" Value="0" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:GlassBorder">
                    <local:ClippingBorder Background="{TemplateBinding Background}" 
                            CornerRadius="{TemplateBinding CornerRadius}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            ClipContent="{TemplateBinding ClipContent}">
                        <Grid>

                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <ContentPresenter Margin="{TemplateBinding Padding}" Canvas.ZIndex="{TemplateBinding ContentZIndex}" Grid.RowSpan="2" />

                            <Border Opacity="{TemplateBinding GlassOpacity}" CornerRadius="{TemplateBinding GlassCornerRadius}" Margin="1,1,1,0"
                                    IsHitTestVisible="False">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                        <GradientStop Color="#ffffffff" Offset="0" />
                                        <GradientStop Color="#C4ffffff" Offset="0.05" />
                                        <GradientStop Color="#54ffffff" Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                    </local:ClippingBorder>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- PerspeciveShadowBorder style -->
    <Style TargetType="local:PerspectiveShadowBorder">
        <Setter Property="PerspectiveShadowOpacity" Value="0.5" />
        <Setter Property="PerspectiveShadowColor" Value="#ff000000" />
        <Setter Property="PerspectiveShadowAngle" Value="-15" />
        <Setter Property="PerspectiveShadowSpread" Value="0" />
        <Setter Property="ClipContent" Value="True" />
        <Setter Property="Background" Value="#ffffffff" />
        <Setter Property="BorderBrush" Value="#ff000000" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PerspectiveShadowBorder">
                    <Grid>
                        <Border Opacity="{TemplateBinding PerspectiveShadowOpacity}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                   CornerRadius="{TemplateBinding ShadowCornerRadius}" IsHitTestVisible="False" RenderTransformOrigin="0,1" >
                            <Border.RenderTransform>
                                <TransformGroup>
                                    <SkewTransform AngleX="-15" AngleY="0" x:Name="PART_PerspectiveShadowSkewTransform" />
                                    <ScaleTransform ScaleX="1" ScaleY="1" x:Name="PART_PerspectiveShadowScaleTransform" />
                                </TransformGroup>
                            </Border.RenderTransform>
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0" x:Name="PART_ShadowOuterStop1" />
                                    <GradientStop Color="#ff000000" Offset="0.1" x:Name="PART_ShadowVertical1"/>
                                    <GradientStop Color="#ff000000" Offset="0.9" x:Name="PART_ShadowVertical2"/>
                                    <GradientStop Color="#00000000" Offset="1" x:Name="PART_ShadowOuterStop2" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.OpacityMask>
                                <LinearGradientBrush EndPoint="1.0,0.5" StartPoint="0.0,0.5" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#00000000" Offset="0"/>
                                    <GradientStop Color="#FF000000" Offset="0.1" x:Name="PART_ShadowHorizontal1"/>
                                    <GradientStop Color="#FF000000" Offset="0.9" x:Name="PART_ShadowHorizontal2"/>
                                    <GradientStop Color="#00000000" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.OpacityMask>
                        </Border>
                        <local:ClippingBorder Background="{TemplateBinding Background}" 
                                CornerRadius="{TemplateBinding CornerRadius}"
                                Padding="{TemplateBinding Padding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                ClipContent="{TemplateBinding ClipContent}">
                            <ContentPresenter />
                        </local:ClippingBorder>


                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

<!-- ********** PANEL STYLES ********** -->
    <!-- DragDockPanel style -->
    <Style TargetType="local:DragDockPanel">
        <Setter Property="Background" Value="#ff000000" />
        <Setter Property="BorderBrush" Value="#ff333333" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DragDockPanel">
                    <Grid>

                        <!-- Border with white background -->
                        <local:OuterGlowBorder 
                            OuterGlowOpacity="0.4" OuterGlowSize="15"
                            CornerRadius="3,3,3,3" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                    >
                            <local:InnerGlowBorder
                                    InnerGlowOpacity="1" CornerRadius="3,3,3,3" InnerGlowColor="#11ffffff" InnerGlowSize="15,15,0,0" Margin="0" Padding="2" ClipContent="True"
                                    Background="Transparent" BorderThickness="0">
                                <Grid>

                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>

                                    <!-- Content presenter for hosting the content -->
                                    <ContentPresenter Grid.Row="1"
                                                      Content="{TemplateBinding Content}"
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"/>

                                    <!-- 
                  Element named PART_GripBar for 
                  handling the dragging of the panel  
                  -->

                                    <Border Background="#7f000000" Margin="-2" Padding="3">
                                        <Grid>
                                            <Border x:Name="GripBarElement"   CornerRadius="3,3,0,0" Background="#00ffffff" VerticalAlignment="Top" MinHeight="30" Cursor="Hand"
                                            Margin="0,0,32,0" IsHitTestVisible="{TemplateBinding DraggingEnabled}">
                                                <Grid>
                                                    <Rectangle Opacity="0.5" >
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush EndPoint="6.58300018310547,6.08300018310547" StartPoint="2.31500005722046,1.81500005722046" 
                                           SpreadMethod="Repeat" MappingMode="Absolute">
                                                                <GradientStop Color="#FFAFAFAF" Offset="0"/>
                                                                <GradientStop Color="#00FFFFFF" Offset="1"/>
                                                                <GradientStop Color="#00FFFFFF" Offset="0.339"/>
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>
                                                    <ContentPresenter Content="{TemplateBinding Header}" 
                                                              ContentTemplate="{TemplateBinding HeaderTemplate}" />

                                                </Grid>
                                            </Border>

                                            <ToggleButton x:Name="MaximizeToggleButton" 
                              					VerticalAlignment="Top" HorizontalAlignment="Right"
 												IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Path=IsMaximized}"
                              					Margin="0,5,5,0" Width="20" Height="20" Cursor="Hand">
                                                <ToggleButton.Template>
                                                    <ControlTemplate TargetType="ToggleButton">
                                                        <Border Background="#7F000000" CornerRadius="2,2,2,2">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="FocusStates">
                                                                    <VisualState x:Name="Focused"/>
                                                                    <VisualState x:Name="Unfocused"/>
                                                                </VisualStateGroup>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Disabled"/>
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.6"/>
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.3"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.15"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                                <VisualStateGroup x:Name="CheckStates">
                                                                    <VisualState x:Name="Checked">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="checkedArrow" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="uncheckedArrow" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Unchecked">
                                                                        <Storyboard/>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Indeterminate"/>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Grid Height="Auto" Width="Auto">
                                                                <Border Margin="0,0,0,0" BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="1,1,1,1" Width="16" Height="16">
                                                                    <Grid>
                                                                        <Path HorizontalAlignment="Right" Margin="0,1.24500000476837,1.70700001716614,5.375" x:Name="uncheckedArrow" VerticalAlignment="Stretch" Width="6.752" Stretch="Fill" Stroke="#FFFFFFFF" Data="M0.5,1.005 L6.2509999,1.005 M6.25,6.8800006 L6.25,0.5 M6.2520003,1.0880001 L0.50000024,6.8800001" />
                                                                        <Path HorizontalAlignment="Stretch" Margin="1.45899999141693,5.74200010299683,5.78900003433228,0.878000020980835" x:Name="checkedArrow" VerticalAlignment="Stretch" Stretch="Fill" Stroke="#FFFFFFFF" Data="M0.5,1.005 L6.2509999,1.005 M6.25,6.8800006 L6.25,0.5 M6.2520003,1.0880001 L0.50000024,6.8800001" Opacity="0" RenderTransformOrigin="0.5,0.5">
                                                                            <Path.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="180"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Path.RenderTransform>
                                                                        </Path>
                                                                    </Grid>
                                                                </Border>
                                                                <Rectangle Fill="#FFFFFFFF" RadiusX="2" RadiusY="2" Margin="1,1,1,1" Opacity="0" x:Name="rectangle"/>
                                                            </Grid>
                                                        </Border>
                                                    </ControlTemplate>
                                                </ToggleButton.Template>
                                            </ToggleButton>
                                        </Grid>
                                    </Border>



                                </Grid>
                            </local:InnerGlowBorder>
                        </local:OuterGlowBorder>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <local:DropShadowTextBlock Text="{Binding}"
                                                  FontFamily="Verdana"
                                                  FontSize="14"
                                                  VerticalAlignment="Center"
                                                  Margin="5"
                                                  DropShadowDistance="3"
                                                  DropShadowAngle="45"
                                                  Foreground="#ffffffff"
                        />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:DragDockPanelHost">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <Canvas />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DragDockPanelHost">
                    <ItemsPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!-- ********** MISC STYLES ********** -->
    <!-- LoadingAnimation style -->
    <Style TargetType="local:LoadingAnimation">
        <Setter Property="EllipseFill">
            <Setter.Value>
                <RadialGradientBrush>
                    <GradientStop Color="#FF000000"/>
                    <GradientStop Color="#00000000" Offset="1"/>
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="EllipseStroke" Value="#00000000" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LoadingAnimation">
                    <Grid>
                        <Grid.Resources>
                            <Storyboard x:Name="PART_LoadingAnimation" RepeatBehavior="Forever">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse3" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse4" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse5" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse6" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse7" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0.66"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0.33"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse8" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.655"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.33"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.4000000" Value="1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0.66"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </Grid.Resources>

                        <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">

                            <Grid Height="90" Width="90" VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" VerticalAlignment="Top" HorizontalAlignment="Center" Width="20" Height="20" x:Name="ellipse1" Opacity="1" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Width="20" Margin="0,10,10,0" x:Name="ellipse2" Opacity="0" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" Height="20" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,0,0" Width="20" x:Name="ellipse3" Opacity="0" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" HorizontalAlignment="Right" Margin="0,0,10,10" Width="20" VerticalAlignment="Bottom" Height="20" x:Name="ellipse4" Opacity="0" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" HorizontalAlignment="Center" Margin="0,0,0,0" Width="20" Height="20" VerticalAlignment="Bottom" x:Name="ellipse5" Opacity="0" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" Margin="10,0,0,10" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="20" x:Name="ellipse6" Opacity="0" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" Margin="0,0,0,0" Height="20" VerticalAlignment="Center" HorizontalAlignment="Left" Width="20" x:Name="ellipse7" Opacity="0.33" />
                                <Ellipse Stroke="{TemplateBinding EllipseStroke}" Fill="{TemplateBinding EllipseFill}" Margin="10,10,0,0" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" Width="20" x:Name="ellipse8" Opacity="0.66" />
                            </Grid>

                            <ContentPresenter HorizontalAlignment="Center" Margin="0,10,0,0" />
                        </StackPanel>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
   
    <!-- COMMON CONTROL STYLES -->
    <!-- RANGE SLIDER -->
    <Style TargetType="local:RangeSlider">
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="Background" Value="#7fffffff" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RangeSlider">
                    <Border Padding="{TemplateBinding Padding}"
                            >
                        <Grid>
                            <Rectangle Height="2" Fill="Black" VerticalAlignment="Center" Margin="2.5,0,2.5,0" />
                            <Border x:Name="SelectedRangeBorder"
                                    Margin="0">
                                <Grid>
                                    <Grid.Resources>
                                        <Style x:Key="EndThumbStyle" TargetType="Thumb">
                                            <Setter Property="Background" Value="#FF1F3B53"/>
                                            <Setter Property="BorderThickness" Value="1"/>
                                            <Setter Property="IsTabStop" Value="False"/>
                                            <Setter Property="BorderBrush">
                                                <Setter.Value>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                                        <GradientStop Color="#FF617584" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="Thumb">
                                                        <Grid Background="Transparent">
                                                            <VisualStateManager.VisualStateGroups>
                                                                <VisualStateGroup x:Name="CommonStates">
                                                                    <VisualState x:Name="Normal"/>
                                                                    <VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#D8FFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#8CFFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                                <SplineColorKeyFrame KeyTime="0" Value="#3FFFFFFF"/>
                                                                            </ColorAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                </VisualStateGroup>
                                                                <VisualStateGroup x:Name="FocusStates">
                                                                    <VisualState x:Name="Focused">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </VisualState>
                                                                    <VisualState x:Name="Unfocused"/>
                                                                </VisualStateGroup>
                                                            </VisualStateManager.VisualStateGroups>
                                                            <Border x:Name="Background" Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Margin="0,5">
                                                                <Grid Margin="1" Background="{TemplateBinding Background}">
                                                                    <Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF448DCA"/>
                                                                    <Rectangle x:Name="BackgroundGradient">
                                                                        <Rectangle.Fill>
                                                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                                                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                                                <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
                                                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                                            </LinearGradientBrush>
                                                                        </Rectangle.Fill>
                                                                    </Rectangle>
                                                                </Grid>
                                                            </Border>
                                                            <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2" IsHitTestVisible="false" Opacity="0" Margin="0,15"/>
                                                            <Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1,6" IsHitTestVisible="false" Opacity="0"/>
                                                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,8" MaxHeight="10">
                                                                <Rectangle Width="1" Fill="Black"/>
                                                                <Rectangle Fill="Black" Width="1" Margin="1,0,0,0"/>
                                                            </StackPanel>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </Grid.Resources>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <Thumb x:Name="RangeCenterThumb"
                                           Grid.Column="1"
                                           Cursor="Hand"
                                           Margin="-5,0,-5,0"
                                           BorderBrush="{TemplateBinding BorderBrush}"
                                           BorderThickness="{TemplateBinding BorderThickness}"
                                           Background="{TemplateBinding Background}"
                                           >
                                        <Thumb.Style>
                                            <Style TargetType="Thumb">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="Thumb">
                                                            <Grid Background="Transparent">
                                                                <Border BorderBrush="{TemplateBinding BorderBrush}"
                                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                                    Background="{TemplateBinding Background}"
                                                                    CornerRadius="3"
                                                                    />
                                                            </Grid>
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </Thumb.Style>
                                    </Thumb>

                                    <Thumb x:Name="RangeStartThumb" 
                                           Cursor="SizeWE"
                                           Width="10"
                                           Style="{StaticResource EndThumbStyle}"
                                           BorderBrush="{TemplateBinding BorderBrush}"
                                           BorderThickness="{TemplateBinding BorderThickness}"
                                           />



                                    <Thumb x:Name="RangeEndThumb"
                                           Grid.Column="2" 
                                           Cursor="SizeWE"
                                           Width="10"
                                           Style="{StaticResource EndThumbStyle}"
                                           BorderBrush="{TemplateBinding BorderBrush}"
                                           BorderThickness="{TemplateBinding BorderThickness}"
                                           />

                                </Grid>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- WatermarkedTextBox -->
    <Style TargetType="local:WatermarkedTextBox">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Watermark" Value="Enter text..." />
        <Setter Property="Width" Value="200" />        
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:WatermarkedTextBox">
                    <Grid x:Name="RootElement">
                        <Grid.Resources>
                            <ControlTemplate x:Key="ValidationToolTipTemplate">
                                <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="OpenStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="0"/>
                                                <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualTransition>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Closed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Open">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid.RenderTransform>
                                        <TranslateTransform x:Name="xform" X="-25"/>
                                    </Grid.RenderTransform>
                                    <Border Margin="4,4,-4,-4" Background="#152A2E31" CornerRadius="4"/>
                                    <Border Margin="3,3,-3,-3" Background="#252A2E31" CornerRadius="4"/>
                                    <Border Margin="2,2,-2,-2" Background="#352A2E31" CornerRadius="4"/>
                                    <Border Margin="1,1,-1,-1" Background="#452A2E31" CornerRadius="4"/>
                                    <Border Background="#FFDC000C" CornerRadius="4"/>
                                    <Border CornerRadius="4">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#66FFFFFF"/>
                                                <GradientStop Color="#66000000" Offset="1"/>
                                                <GradientStop Color="#00E5E5E5" Offset="0.1"/>
                                                <GradientStop Color="#00161616" Offset="0.9"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                        <TextBlock Margin="8,3,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding Path=(Validation.Errors)[0].Exception.Message}" TextWrapping="Wrap"/>
                                    </Border>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                            <SplineColorKeyFrame KeyTime="0" Value="#FF99C1E2"/>
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="Border" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#5EC9C9C9"/>
                                <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
                                    <Grid>
                                    <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
                                    <ContentControl x:Name="Watermark" Content="{TemplateBinding Watermark}" Margin="{TemplateBinding Padding}" ContentTemplate="{TemplateBinding WatermarkTemplate}" 
                                                    IsHitTestVisible="False"/>
                                    </Grid>
                                </Border>
                            </Grid>
                        </Border>
                        
                        <Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Opacity="0" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}"/>
                        <Border x:Name="FocusVisualElement" Margin="1" IsHitTestVisible="False" Opacity="0" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}"/>
                        <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
                                <Path Fill="#FFDC000C" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
                                <Path Fill="#ffffff" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="WatermarkTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid>
                        <ContentControl Content="{Binding}" FontStyle="Italic" Foreground="#ffcecece"  />
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>
